home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE23 / CLINIC / DBCOMBOU.PAS < prev    next >
Pascal/Delphi Source File  |  1997-04-27  |  937b  |  44 lines

  1. unit DBComboU;
  2.  
  3. interface
  4.  
  5. uses
  6.   WinProcs, WinTypes, Messages, SysUtils, Classes, Graphics, Controls,
  7.   Forms, Dialogs, DBCtrls, StdCtrls, DBLookup, Db, DBTables;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     TblCustomer: TTable;
  12.     DSCustomer: TDataSource;
  13.     TblOrders: TTable;
  14.     DSOrders: TDataSource;
  15.     DBLookupCombo1: TDBLookupCombo;
  16.     procedure FormCreate(Sender: TObject);
  17.   private
  18.     { Private declarations }
  19.   public
  20.     { Public declarations }
  21.   end;
  22.  
  23. var
  24.   Form1: TForm1;
  25.  
  26. implementation
  27.  
  28. {$R *.DFM}
  29.  
  30. procedure TForm1.FormCreate(Sender: TObject);
  31. var
  32.   Loop: Integer;
  33. begin
  34.   if FormStyle = fsStayOnTop then
  35.     with DBLookupCombo1 do
  36.       for Loop := 0 to ComponentCount - 1 do
  37.         if Components[Loop] is TPopupGrid then
  38.           with TPopupGrid(Components[Loop]) do
  39.             SetWindowPos(Handle, HWnd_TopMost,
  40.               0, 0, 0, 0, swp_NoMove or swp_NoSize)
  41. end;
  42.  
  43. end.
  44.